Skip to content

Normalize media upload filenames - #138

Closed
manton wants to merge 177 commits into
mainfrom
codex/fix-video-filename-inconsistencies
Closed

Normalize media upload filenames#138
manton wants to merge 177 commits into
mainfrom
codex/fix-video-filename-inconsistencies

Conversation

@manton

@manton manton commented Jan 8, 2026

Copy link
Copy Markdown
Contributor

Motivation

  • Video uploads were inconsistently named (e.g. video.mov vs original filenames), causing mismatches when uploading and later referencing uploaded media.
  • Filenames coming from iOS/Android can contain spaces or unsafe characters that may break upload endpoints or local caching.
  • Large/chunked upload flow and single-file upload flow used different filename logic, leading to inconsistencies across the code paths.
  • Provide a single, predictable filename strategy to avoid upload/lookup errors and to make cached files safe.

Description

  • Added src/utils/file_names.js with inferExtensionFromType, sanitizeFileName, and buildUploadFileName helpers to infer extensions and clean filenames.
  • Updated large upload flow to use buildUploadFileName and to use sanitized target names in ensure_local_uri_for_upload so cached copies use safe filenames.
  • Updated MicroPubApi.upload_media to use buildUploadFileName when appending the file to FormData so single-file uploads use the same cleaned filename.
  • Removed an unused Platform import from MicroPubApi.js as part of the change.

Testing

  • No automated tests were run against these changes.
  • (No unit or integration tests were executed as part of this PR.)
  • Manual verification is recommended for both single-file uploads and large/chunked uploads across iOS and Android to confirm filename behavior.
  • Linting/build were not executed here.

Codex Task

manton and others added 28 commits August 27, 2026 17:55
- add guarded WebView remount and bootstrap recovery for Android renderer/session failures
- register appearance and app state listeners once and remount WebViews when Android resumes with a changed theme
- move WebView URL building into a helper that avoids URLSearchParams for Hermes compatibility
- move push notification bootstrap to app startup so initial notifications are captured reliably
- queue tapped notifications until auth, navigation, and app state are ready before opening the target post
- wire iOS notification response callbacks and Android intent updates for open-from-notification paths
- add targeted routing tests and temporary debug logging for the remaining background-resume investigation
- keep navigation readiness in sync with the live navigation ref during remounts
- retry pending notification replay across foreground banner and cold-boot timing windows
- allow tapped foreground banners to open once navigation is ready
- cover the foreground banner routing case in tests
manton and others added 28 commits August 27, 2026 17:55
Apply the toolbar status-bar inset even when edgeToEdgeEnabled is off, and wire statusBarStyle to the app theme so icon tint follows light/dark mode.
Fall back to DecorView status-bar insets when SafeArea consumes them, and use TouchableOpacity with hitSlop for the Android back button.
Draw under a transparent status bar so navbar chrome provides the theme colour, and keep a single toolbar inset instead of double-padding.
Prevent ghost dismissed screens and stuck iOS 26 interaction sinks from
blocking touches, and stop loading/refresh overlays from intercepting input.
Only draw under the status bar on Android 15+ or when edge-to-edge is enabled, so older devices keep an opaque status bar and header controls stay tappable.
@manton

manton commented Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

Messed up this branch, closing.

@manton manton closed this Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants